<template>
	<!-- 订单管理页面 -->
	<view>
		<view class="box">
			<view class="order_subsection">
				<u-subsection :list="list" :current="curNow" @change="sectionChange" :bold="true" bgColor="#F6F6F6"></u-subsection>
			</view>
			<view class="order_shopBox"  @click="goOrderEvaluate">
				<view class="order_shop">
					<view class="order_shopImage">
						<u-avatar :src="src" shape="square"></u-avatar>
					</view>
					<view class="order_shopName">
						<u--text text="我用十年青春,付你你最后之约"></u--text>
					</view>	
				</view>
				<view class="order_commodity">
					<view class="order_commodityImage">
						<u-avatar :src="src" shape="square" size="70"></u-avatar>
					</view>
					<view class="order_commodityName">
						<u--text text="咖喱牛肉焗饭+鸡块+可乐套餐" class="order_commodityText"></u--text>
					</view>
					<view class="order_commodityPrice">
						<u--text text="¥12.8" size="16" style="margin-top:14px;margin-left: 8px;"></u--text>
						<u--text text="共1件" size="12" color="#D5D5D5" style="margin-left: 12px;"></u--text>
					</view>
				</view>
				<view class="anotherOrder">
					<view class="" style="width: 90px;height: 32px;float: right;margin-right: 14px;margin-top: 10px;">
						<u-button type="primary" :plain="true" text="再来一单" shape="circle"></u-button>
					</view>
				</view>
			</view>
		<!-- 	<text>订单管理界面</text>
			<text>跳转评价页面测试</text> -->
		</view>			
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				src: '/static/icon/725df84c4220812289b3f757a15385e.jpg',
				list: ['全部', '待消费', '带评价','退款'],
				// 默认初始值
				curNow: 0,
			}
		},
		methods: {
			sectionChange(index) {
				this.curNow = index;
			},
			//根据用户id查询用户订单
			getAllShopById() {
				this.$myRequest({
					url: '/eat-service/shop/shopById',
					method: 'get',
					data: {
						shopId: this.shopId,
					}
				}).then(res => {
					this.shopForm = res.data.obj
					if (this.shopForm.backgroundImage === null) {
						this.shopForm.backgroundImage = this.shopForm.shopLogo
					}
				})
			
			},
			// 跳转订单评价页面
			goOrderEvaluate(){
				uni.navigateTo({
					url: '/pages/order/order-evaluate/order-evaluate'
				})
			}
		}
	}
</script>

<style scoped>
	.anotherOrder{
		width: 100%;
		height: 62px;
	}
	.order_commodityPrice{
		width: 60px;
		height: 70px;
		float: left;
	}
	.order_commodityText{
		line-height: 4.7;
		font-size: 13px;
	}
	.order_commodityName{
		width: 240px;
		height: 70px;
		float: left;
		margin-left: 10px;
	}
	.order_commodityImage{
		width: 70px;
		height: 70px;
		float: left;
	},
	.order_commodity{
		width: 100%;
		height: 75px;
	}
	.order_shopName{
		width: 300px;
		height: 30px;
		margin-top: -2px;
		float: left;
		margin-left: 16px;
	}
	.order_shopImage{
		width: 30px;
		height: 30px;
		margin-top: -10px;
		float: left;
	}
	.order_shop{
		width: 100%;
		height: 20px;
		padding-top: 20px;
		padding-bottom: 20px;
	}
	.order_subsection{
		padding-top: 20px;
		padding-bottom: 20px;
	}
	.order_shopBox{
		width: 94%;
		height: 200px;
		margin: 0 auto;
		background-color: white;
	}
	.box{
		height: 800px;
		background-color: #F6F6F6;
	}
</style>
